home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / quicktime / goodies / aiffwriter / aiffwriter.r < prev    next >
Encoding:
Text File  |  2000-06-23  |  2.9 KB  |  130 lines

  1. //////////
  2. //
  3. //    File:        AIFFWriter.r
  4. //
  5. //    Contains:    Resources for creating a fat sound output component 'thng' resource.
  6. //
  7. //    Written by:    Mark Cookson, Apple Developer Technical Support
  8. //                Based on code by Kip Olson.
  9. //    Revised by: Tim Monroe
  10. //
  11. //    Copyright:    © 1993-1999 by Apple Computer, Inc., all rights reserved.
  12. //
  13. //    Change History (most recent first):
  14. //
  15. //       <1>         03/05/99    rtm        first inherited file; changed some compiler conditionals
  16. //                                    to support Windows compiles
  17. //
  18. //
  19. //////////
  20.  
  21.  
  22. //////////
  23. //
  24. // defines needed before including headers
  25. //
  26. //////////
  27.  
  28. // use the platform info array in the 'thng' resource for 68K and PowerPC, or Windows
  29. #define UseExtendedThingResource        1
  30.  
  31.  
  32. //////////
  33. //
  34. // header files
  35. //
  36. //////////
  37.  
  38. #include "MacTypes.r"
  39. #include "Components.r"
  40. #include "Sound.r"
  41. #include "Icons.r"
  42.  
  43.  
  44. //////////
  45. //
  46. // constants
  47. //
  48. //////////
  49.  
  50. #define kAIFFWriterResID            1000                    // 'thng', 'STR ', 'ICON' resources
  51. #define kAIFFWriterSubType            'hack'                    // OS Type for component
  52.  
  53. #define kAIFFWriterVersion            0x00010000                // version for this sifter
  54. #define kAIFFWriterManufacturer        '????'                    // manufacturer
  55.  
  56. // resource names will be created for debug versions
  57. #ifdef _DEBUG
  58. #define kAIFFWriterName                "AIFF Writer"
  59. #else
  60. #define kAIFFWriterName                ""
  61. #endif
  62.  
  63. #define kAIFFWriterInfoStringID        1001
  64.  
  65.  
  66. //////////
  67. //
  68. // component resource for AIFF writer output component
  69. //
  70. //////////
  71.  
  72. resource 'thng' (kAIFFWriterResID, kAIFFWriterName, purgeable) {
  73.     kSoundOutputDeviceType,
  74.     kAIFFWriterSubType,
  75.     kAIFFWriterManufacturer,
  76.     cmpWantsRegisterMessage,
  77.     0,
  78.     kSoundComponentType,
  79.     kAIFFWriterResID,                
  80.     'STR ',
  81.     kAIFFWriterResID,                            // name
  82.     'STR ',
  83.     kAIFFWriterInfoStringID,                    // info
  84.     'ICON',
  85.     kAIFFWriterResID,                            // icon
  86.     kAIFFWriterVersion,                                                
  87.     componentDoAutoVersion | componentHasMultiplePlatforms, 0,
  88.     {
  89. #if TARGET_OS_MAC
  90.         0, kSoundComponentType, kAIFFWriterResID, platform68k;
  91.         0, kSoundComponentPPCType, kAIFFWriterResID, platformPowerPC
  92. #else
  93.         0, 'dlle', kAIFFWriterResID, platformWin32
  94. #endif
  95.     }
  96. };
  97.  
  98. resource 'ICON' (kAIFFWriterResID, kAIFFWriterName, purgeable) {
  99.     $"0000 0000 0000 0000 0000 0000 0003 8000"
  100.     $"0003 8000 0003 8000 0003 8000 0003 8000"
  101.     $"0003 8000 0003 8000 0003 8000 0003 8000"
  102.     $"000F E000 0007 C000 0003 8000 0001 0000"
  103.     $"0000 0000 0000 0000 7FFF FFFE 8000 0001"
  104.     $"8000 0001 8000 0001 8000 0001 8000 0001"
  105.     $"8000 0001 8800 0001 8000 0001 8000 0001"
  106.     $"7FFF FFFE"
  107. };
  108.  
  109. resource 'STR ' (kAIFFWriterResID, kAIFFWriterName, purgeable) {
  110.     kAIFFWriterName
  111. };
  112.  
  113. resource 'STR ' (kAIFFWriterInfoStringID, kAIFFWriterName, purgeable) {
  114.     "AIFF Writer example sound output device. © 1993-1999, Apple Computer."
  115. };
  116.  
  117. resource 'vers' (1) {
  118.     0x2, 0x0, beta, 0x1,
  119.     0,
  120.     "2.0b1",
  121.     "AIFF Writer v2.0b1, © Apple Computer, Inc. 1993-1998"
  122. };
  123.  
  124. #if !TARGET_OS_MAC
  125. resource 'dlle' (kAIFFWriterResID, kAIFFWriterName) {
  126.     "_SoundOutputComponentDispatch"
  127. };
  128. #endif
  129.  
  130.